package com.zoweunion.mechanic.service.app;

import com.github.pagehelper.PageInfo;
import com.zoweunion.mechanic.entity.FaultCodeBean;
import com.zoweunion.mechanic.entity.RenewalCardEntity;
import com.zoweunion.mechanic.model.ResponseBean;
import com.zoweunion.mechanic.model.User;
import com.zoweunion.mechanic.util.MyException;

import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.time.LocalDate;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@SuppressWarnings("all")
public interface ToolCarDataService {

    /**
     * 获取车辆列表
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> list(User currentUser, Map<String, Object> reqMap);

    /**
     * 设置状态
     * @param carList
     */
    List<Map<String, Object>> setState(List<Map<String, Object>> carList);

    /**
     * 获取车辆列表
     * @param reqMap
     * @return
     */
    Map<String, Object> realData(User currentUser, Map<String, Object> reqMap) throws MyException;

    Map<String, Object> selectMoreData(Map<String, Object> map);

    ResponseBean selectHistoryData(Map<String, Object> map);

    ResponseBean selectHistoryDataNew(Map<String, Object> map);
    ResponseBean selectHistoryDataByStartDateAndEndDate(Map<String, Object> map);

    /**
     * 获取车辆列表_New
     * @param reqMap
     * @return
     */
    Map<String, Object> realDataNew(Map<String, Object> reqMap) throws MyException;

    /**
     * 获取车辆列表
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> maintenanceRecords(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 获取车辆列表
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> historyTrajectory(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 获取数据统计对象，经纬度的统计
     * @param thingsId
     * @param tableName
     * @return
     */
    Map<String, Object> getDataStatisticsObj(String thingsId, String tableName, String date);

    Map<String,Object> carOilLevelStatisticsNew(Map<String, Object> map);

    Map<String,Object> carCountFuelWork(Map<String, Object> map);
    /**
     * 获取车辆工时统计
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> carWorkingHoursStatistics(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 获取运行时长列表
     * @param reqMap
     * @return
     * @throws MyException
     */
    List<Map<String, Object>> getRunningHoursList(Map<String, Object> reqMap) throws MyException;

    /**
     * 获取车辆油耗统计
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> carFuelConsumptionStatistics(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 获取车辆油耗工时统计
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> carFuelConsumptionWorkHoursStatistics(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 获取车辆油耗工时统计
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> carFuelConsumptionWorkHoursStatistics2(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 车辆油位统计
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> carOilLevelStatistics(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 车辆油位统计
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> workingHoursDistributionStatistics(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 获取天气
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> getWeather(User currentUser, Map<String, Object> reqMap) throws MyException;


    Map<String, Object> getFuelTank(User currentUser, Map<String, Object> reqMap);

    void modifyFuelTank(User currentUser, Map<String, Object> reqMap);

    List<Map<String, Object>> processData(List<Map<String, Object>> dailyDataList, LocalDate startTime, LocalDate endTime);

    Map<String, Object> carRealFaultCode(User currentUser, Map<String, Object> reqMap) throws MyException;

    Map<String, Object> carHistoryFaultCode(User currentUser, Map<String, Object> reqMap) throws MyException;

    List<Map<String,Object>> listCarDateNew(User currentUser, Map<String, Object> reqMap);

    void addFaultCode(Map<String, Object> carDataMap, List<Map<String, Object>> faultCodeList, List<Map<String, Object>> dataList, String no, String intelligentTemplateId, String faultId);

    /**
     * 获取历史故障代码
     *
     * @param currentUser
     * @param reqMap
     * @throws MyException
     */
    void grabHistoryFaultCode(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 删除今日数据中的历史故障代码
     *
     * @param currentUser
     * @param reqMap
     * @throws MyException
     */
    void deleteTodayHistoryFaultCode(User currentUser, Map<String, Object> reqMap) throws MyException;

    /**
     * 保存车图片
     * @param currentUser
     * @param reqMap
     */
    void saveCarAttachment(User currentUser, Map<String, Object> reqMap);

    /**
     * 获取车图片
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> getCarAttachment(User currentUser, Map<String, Object> reqMap);

    /**
     * 成员组成
     * @param currentUser
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> carMembership(User currentUser, Map<String, Object> reqMap);

    Map<String, Object> getDashboard(User currentUser, Map<String, Object> reqMap) throws MyException;

    void importCarLocation();

    /**
     * GPS卫星图
     * @param currentUser
     * @param reqMap
     * @return
     */
    Map<String, Object> getGPSsatellite(User currentUser, Map<String, Object> reqMap) throws MyException;

    List<Map<String,Object>> selectInfoByThingsId(Map<String, Object> map) throws MyException, ParseException;

    List<String> selectPcCarList(Map<String, Object> map);

    List<String> selectPcCarColumnList(Map<String, Object> map) throws MyException;

    List<Map<String, Object>> selectCarList(Map<String, Object> map) throws MyException;

    Map<String, Object>  selectWorkHourNew(Map<String, Object> map);

    void updateDateHistory();

    PageInfo selectCarFaultCode(Map<String, Object> map) throws MyException;

    List<String> insertTer();

    Map<String,Object> selectMoreDataList(Map<String, Object> map);

    void selectMoreDataListExport(Map<String, Object> map, HttpServletResponse response) throws Exception;

    Map<String,Object> listCarDateInfoNew(User currentUser, Map<String, Object> str);

    Map<String,Object> selectCarFaultCodeInfo(Map<String, Object> map) throws MyException;

    void addOiLevelPictureUrl(Map<String, Object> map) throws MyException;

    List<Map<String, Object>> getOilLevelList(Map<String, Object> reqMap);

    void updateOilLevelUrl(Map<String, Object> reqMap);

    List<Map<String, Object>> listForCarDateNew(User currentUserNoVerify, Map<String, Object> str);

    List<Map<String, Object>> listForCarDateNewForThird(Map<String, Object> str);

    PageInfo listForCarPage(User currentUserNoVerify, Map<String, Object> str);

    List<Map<String, Object>> selectHistory(Map<String, Object> map) throws MyException, ParseException;

    List<Map<String, Object>> selectTrackHistory(Map<String, Object> map) throws ParseException;

    LinkedHashMap<String,List<Map<String, Object>>> selectTrackHistoryLastNew(Map<String, Object> map) throws ParseException;
    List<Map<String, Object>> selectTrackHistoryByStartDateAndEndDate(Map<String, Object> map) throws ParseException;

    Map<String, Object> addName(Map<String, Object> carList, Map<String, Object> str);


    PageInfo faultCodeList(User currentUser, Map<String, Object> reqMap);

    PageInfo carFaultCodeList(User currentUser, Map<String, Object> reqMap);

    PageInfo carFaultDetailList(User currentUser, Map<String, Object> reqMap);

    List<FaultCodeBean> exportFaultCodeList(User currentUser, Map<String, Object> reqMap);

    List<Map<String, Object>> carTirepressureData(Map<String, Object> map);

    /**
     * 获取无线设备数据
     * @param map
     * @return
     */
    Map<String, Object> selectWirelessDeviceData(Map<String, Object> map);

    List<RenewalCardEntity> exportRenewalMessage(String id);

}
